package app.v1.yd.service;

import app.v1.yd.domain.pojo.YdWarehouse;

import java.util.List;

/**
 * @author feizns
 * @since 2023/9/11
 */
public interface YdWarehouseService {

    /**
     * 查询仓库编号
     * @param warehouseName {@link String}
     * @return {@link String}
     */
    static String selectNoByName(String warehouseName) {
        return new YdWarehouse().setName(warehouseName).fetch().obj(YdWarehouse::getNo);
    }

    /**
     * 从宜搭更新所有仓库
     */
    void updateAllWarehouseFromYiDa();

    /**
     * 所有仓库
     * @return {@link List}<{@link YdWarehouse}>
     */
    List<YdWarehouse> all();

}
